@use './public.scss';
@use './nprogress.scss';

// 全局重置样式
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol';
  font-size: 14px;
  line-height: 1.5715;
  color: $text-color;
  background-color: $background-color-light;
}

#root {
  height: 100%;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

// 通用工具类
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.full-height {
  height: 100%;
}

.full-width {
  width: 100%;
}

// 布局相关
.layout-content {
  padding: $padding-lg;
  background: $component-background;
  min-height: calc(100vh - #{$layout-header-height});
}

// 卡片样式
.content-card {
  background: $component-background;
  border-radius: $border-radius-base;
  box-shadow: $box-shadow-card;
  padding: $padding-lg;
  margin-bottom: $padding-lg;
}

.property-panel-compact {
  .ant-form-item {
    margin-bottom: 12px;
  }

  .ant-collapse-content-box {
    padding-top: 12px !important;
    padding-bottom: 4px !important;
  }
}

.ant-image {
  height: 100%;
}